package com.realjinge.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.realjinge.dao.AnswerDao;
import com.realjinge.entity.Answer;

/**
 * 
 * @author realjinge
 * 
 */
@Service
public class AnswerService {
	@Resource
	private AnswerDao answerDao;

	public Integer insertAnswer(Answer answer) {
		return answerDao.insertAnswer(answer);
	}

	public Answer selectAnswerByID(Integer id) {
		return answerDao.selectAnswerByID(id);
	}

	public List<Answer> selectAnswerByQuestionID(Integer questionId) {
		return answerDao.selectAnswerByQuestionID(questionId);
	}
	
	public List<Answer> selectAnswerByQuestionNo(String questionNo) {
		return answerDao.selectAnswerByQuestionNo(questionNo);
	}
	
}
